<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <title>Benefit+ | <?php echo $page_title; ?></title>
        <meta name="renderer" content="webkit|ie-comp|ie-stand">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <link href="/static/css/bootstrap.min.css" rel="stylesheet">
        <link href="/static/font-awesome/css/font-awesome.css" rel="stylesheet">

        <link href="/static/css/animate.css" rel="stylesheet">
        <link href="/static/css/style.css" rel="stylesheet">

        <script data-main="/static/js/admin-frame.js" src="/static/js/require.min.js"></script>
    </head>
    <body>

        <!--START 左侧导航-->
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav metismenu" id="side-menu">
                    <li class="nav-header">
                        <div class="dropdown profile-element"> 
                            <span>
                                <?php if ($admin_profile) { ?>
                                    <img alt="头像" title="头像" id="admin-head-img" class="img-circle" src="<?php echo $admin_profile; ?>" />
                                <?php } else { ?>
                                    <img alt="头像" title="还未上传头像" id="admin-head-img" class="img-circle" src="/static/img/console/admin-profile.jpg"/>
                                <?php } ?>
                            </span>
                            <a href="#">
                                <span class="clear">
                                    <span class="block m-t-xs"> <strong class="font-bold"><?php echo $admin_account; ?></strong></span> 
                                    <strong class="text-muted text-xs block">
                                        <?php
                                        if (isset($admin_public)) {
                                            echo '<a href="/console/publicNo">' . $admin_public . '</a>';
                                        } else {
                                            echo '<a href="/console/publicNo">还未设置公众号</a>';
                                        }
                                        ?>
                                    </strong> 
                                </span>
                            </a>
                        </div>
                        <div class="logo-element">
                            Be+
                        </div>
                    </li>

                    <?php if ($admin_role === '1') { ?>
                        <li <?php if ($class === 'console' && ($method === 'banner' || $method === 'bannerEdit')) echo 'class="active"'; ?>>
                            <a href="#" title="管理员中心"><i class="fa fa-user"></i> <span class="nav-label">管理员中心</span><span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level collapse">
                                <li <?php if ($class === 'console' && ($method === 'banner' || $method === 'bannerEdit')) echo 'class="active"'; ?>>
                                    <a href="/console/banner">幻灯片设置</a>
                                </li>
                            </ul>
                        </li>
                    <?php } ?>

                    <li <?php if ($class === 'console' && $method === 'dashboard') echo 'class="active"'; ?>>
                        <a href="/console/dashboard" title="控制台"><i class="fa fa-dashboard"></i> <span class="nav-label">控制台</span></a>
                    </li>
                    <li <?php if ($class === 'console' && $method === 'website') echo 'class="active"'; ?>>
                        <a href="/console/website" title="站点设置"><i class="fa fa-cogs"></i> <span class="nav-label">站点设置</span></a>
                    </li>
                    <li <?php if ($class === 'console' && $method === 'publicNo') echo 'class="active"'; ?>>
                        <a href="/console/publicNo" title="公众号"><i class="fa fa-weixin"></i> <span class="nav-label">公众号</span></a>
                    </li>
                    <li 
                    <?php
                    if ($class === 'console' && ($method === 'shopCreate' || $method === 'shopList' || $method === 'shopEdit' || $method === 'brancheCreate' || $method === 'brancheList' || $method === 'brancheEdit')) {
                        echo 'class="active"';
                    }
                    ?>>
                        <a href="#" title="入驻管理"><i class="fa fa-th-list"></i> <span class="nav-label">入驻管理</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level collapse">
                            <li <?php if ($class === 'console' && ($method === 'shopList' || $method === 'shopEdit' || $method === 'brancheList' || $method === 'brancheEdit')) echo 'class="active"'; ?>>
                                <a href="/console/shopList">我的门店</a>
                            </li>
                            <li <?php if ($class === 'console' && $method === 'shopCreate') echo 'class="active"'; ?>>
                                <a href="/console/shopCreate">新增门店</a>
                            </li>
                            <li <?php if ($class === 'console' && $method === 'brancheCreate') echo 'class="active"'; ?>>
                                <a href="/console/brancheCreate">新增分店</a>
                            </li>
                        </ul>
                    </li>
                    <li <?php if ($class === 'console' && $method === 'shop_admin') echo 'class="active"'; ?>>
                        <a href="/console/shop_admin" title="绑定记录"><i class="fa fa-group"></i> <span class="nav-label">绑定记录</span></a>
                    </li>
                    <li <?php if ($class === 'console' && ($method === 'coupon' || $method === 'couponEdit')) echo 'class="active"'; ?>>
                        <a href="/console/coupon" title="优惠券"><i class="fa fa-credit-card"></i> <span class="nav-label">优惠券</span></a>
                    </li>
                </ul>
            </div>
        </nav>
        <!--END 左侧导航-->

        <!--START 右侧容器-->
        <div id="page-wrapper" class="gray-bg">
            <!--START 顶部菜单-->
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top white-bg" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header">
                        <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
                    </div>
                    <ul class="nav navbar-top-links navbar-right">
                        <li>
                            <span class="m-r-sm text-muted welcome-message">Welcome to Benefit+ Admin Console.</span>
                        </li>
                        <li>
                            <a href="/welcome/logout">
                                <i class="fa fa-sign-out"></i> 注销
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
            <!--END 顶部菜单-->